package cn.bgs.service.Impl;

import cn.bgs.mapper.ComplaintMapper;
import cn.bgs.service.ComplaintService;
import cn.bgs.vo.ComplaintTypeVo;
import cn.bgs.vo.Pagevo;
import cn.bgs.vo.TopUpvo;
import cn.bgs.vo.testVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class ComplaintServiceImpl implements ComplaintService {
    @Autowired
    ComplaintMapper complaintMapper;
    @Override
    public PageInfo<testVo> page3(Pagevo pagevo) {
        PageHelper.startPage(pagevo.getPageNum(),pagevo.getPageSize());
        System.out.println(pagevo.getType());
        List<testVo> complaintTypeVoList =complaintMapper.selectCompAll(pagevo.getType());
        PageInfo<testVo> cc=new PageInfo<>(complaintTypeVoList);
        System.out.println("===="+cc);
        return cc;
    }

    @Override
    public void delCompAll(Integer complaintsTypeId) {
        complaintMapper.delCompAll(complaintsTypeId);
    }

    @Override
    public void updateComptAll(testVo form) {
           complaintMapper.updateComptAll(form);
    }

    @Override
    public void insertComptAll(testVo insertaa) {
        complaintMapper.insertComptAll(insertaa);
    }


}
